home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 41
/
Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso
/
Aminet
/
game
/
think
/
newmastermind.lha
/
newmastermind
/
install
next >
Wrap
Text File
|
2000-11-08
|
4KB
|
116 lines
;;; -*-scheme-*-
;;; Installation script for newmastermind
;;;
;;; Copyright (C) 1994-2000 Håkan L. Younes (lorens@hem.passagen.se)
;;; Strings
(set #how-install
(cat "Do you want to install the whole program or just update the "
"language catalogs?"))
(set #how-install-help
(cat "Choose \"Install whole program\" if you are installing from "
"scratch or if you are updating an old version.\n"
"\nChoose \"Update languages\" if you want to install new "
"language catalogs."))
(set #how-install-1 "Install whole program")
(set #how-install-2 "Update languages")
(set #where-install
"Choose location where you want to install NewMasterMind.")
(set #where-languages
"Where do you want to install the language catalogs?")
(set #where-languages-help
(cat "This lets you choose if you want the language catalogs to be "
"copied to the same location as the rest of the program, or if "
"you want to have them in the global Catalog dir."))
(set #which-languages
"Which languages do you want NewMasterMind to support?")
(set #which-languages-help
(cat "Check all languages you want NewMasterMind to support.\n"
"\nIf a language is already installed and you don't check it, "
"it will be removed."))
;;; Procedures
(procedure install-program
(set @default-dest prog-dest)
(copylib (source (tackon sourcedir "NewMasterMind"))
(dest prog-dest))
(copylib (source (tackon sourcedir "NewMasterMind.guide"))
(dest prog-dest)))
(procedure install-icons
(copyfiles (source icon-srcdir)
(dest prog-dest)
(choices "NewMasterMind.info"
"NewMasterMind.guide.info"))
(tooltype (dest (tackon prog-dest "NewMasterMind"))
(noposition))
(tooltype (dest (tackon prog-dest "NewMasterMind.guide"))
(noposition)))
(procedure install-locales
(set where-languages (askchoice (prompt #where-languages)
(help #where-languages-help)
(choices locale-dest
locale-sysdest)))
(if (= where-languages 1)
(set locale-dest locale-sysdest))
(set which-languages (askoptions (prompt #which-languages)
(help #which-languages-help)
(choices "Dansk"
"Svenska")))
(set locale "dansk")
(if (IN which-languages 0)
(install-locale)
(remove-locale))
(set locale "svenska")
(if (IN which-languages 1)
(install-locale)
(remove-locale)))
(procedure install-locale
(makedir locale-dest)
(makedir (tackon locale-dest locale))
(copylib (source (tackon (tackon locale-srcdir locale)
"newmastermind.catalog"))
(dest (tackon locale-dest locale))))
(procedure remove-locale
(delete (tackon (tackon locale-dest locale)
"newmastermind.catalog"))
(if (NOT (= locale-dest locale-sysdest))
((delete (tackon locale-dest locale))
(delete locale-dest))))
;;; Main program
(set sourcedir (pathonly @icon))
(set icon-srcdir sourcedir)
(set locale-srcdir (tackon sourcedir "Catalogs"))
(set locale-sysdest "LOCALE:Catalogs")
(set prog-dest (askdir (prompt #where-install)
(help @askdir-help)
(default @default-dest)))
(set how-install (askchoice (prompt #how-install)
(help #how-install-help)
(choices #how-install-1 #how-install-2)))
(if (= how-install 0)
((install-program)
(install-icons))
(set @default-dest ""))
(set locale-dest (tackon prog-dest "Catalogs"))
(install-locales)